<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>

<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="css/reset.css" type="text/css" />
<link rel="stylesheet" href="css/publicPage.css" type="text/css" />

<style>
#register{
font-size:16px;
position: relative;
top:-7px;
left:25px;
}

:hover>#register{
color:orange;
}
</style>
<script type="text/javascript" src="layer/layer.js"></script>
<script>
	$(function() {
		$("#login").on("click", function() {

			layer.open({
				type : 1,
				title : '用户登录',
				shadeClose : true,
				shade : 0.4,
				area : [ '450px', '400px' ],
				content : $("#login1")
			//iframe的url
			});

		});
	});
</script>
</head>

<body>

	<div class="main">
		<ul>
			<li><a href="#">考试</a>
			</li>
			<li><a href="#">面试题</a>
			</li>
			<li><a href="#">菜鸟联盟</a>
			</li>
			<li><a href="#">人才招聘</a>
			</li>
			<li><a href="#">资源下载</a>
			</li>
			<li><a href="#">贴吧</a>
			</li>
			<li><c:if test="${empty userInfo }">
					<a href="#" id="login">登录</a>
				</c:if> <c:if test="${not empty userInfo }">
					<a href="jsp/userInfo.jsp">${userInfo.nickname }</a>
				</c:if></li>
			<li><a type="button" class="btn" data-toggle="modal"
				data-target="#registerModal" id="register">注册</a>
			</li>
		</ul>
		<div class="clear"></div>
	</div>
	<div class="clear"></div>
	<div class="login" id="login1">

		<div class="iform">
			<form action="userInfo/userLogin" method="post"
				style="margin-top: 25px;">
				<input type="text" name="phone" placeholder="用户名"
					style="width:240px;height: 35px;" value="11111111111" /> <input type="password"
					name="password" placeholder="密码" style="width:240px;height: 35px;" value="123123" />
				<br> <br> <input type="submit" value="登录"
					style="width:242px;height: 40px;" />
			</form>


		</div>


	</div>
	<div class="modal fade" id="registerModal" tabindex="-1" role="dialog"
		aria-labelledby="loginModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<h4 class="modal-title text-center">注册</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" action="userInfo/userRegister" method="post">
						<div class="form-group">
							<label class="col-md-2 control-label col-md-offset-2">用户名:</label>
							<div class="col-md-6">
								<input type="text" class="form-control" name="phone">
							</div>
						</div>
						<div class="form-group">
							<label class="col-md-2 control-label col-md-offset-2">密码:</label>
							<div class="col-md-6">
								<input type="text" class="form-control" name="password">
							</div>
						</div>
						<div class="form-group">
							<label class="col-md-2 control-label col-md-offset-2">确认密码:</label>
							<div class="col-md-6">
								<input type="text" class="form-control" name="password1">
							</div>
						</div>
						<div class="form-group">
							<label class="col-md-2 control-label col-md-offset-2">邮箱:</label>
							<div class="col-md-6">
								<input type="text" class="form-control" name="email">
							</div>
						</div>
						<div class="form-group">
							<label class="col-md-2 control-label col-md-offset-2">昵称:</label>
							<div class="col-md-6">
								<input type="text" class="form-control" name="nickname">
							</div>
						</div>
						<div class="form-group">
							<div class="col-md-offset-5 col-md-2">
								<button type="submit" class="btn btn-default">注册</button>
							</div>
						</div>
					</form>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">
						Close</button>
				</div>
			</div>
		</div>
	</div>

	<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
</body>

</html>